package com.tbit.main.service.impl;

import com.tbit.main.constant.DaoParamConstant;
import com.tbit.main.dao.log.RideRefundLogDao;
import com.tbit.main.pojo.RideRefundOrderSta;
import com.tbit.main.service.RideRefundLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author LMY
 * @create 2022-05-07 16:27
 */
@Service("rideRefundLogService")
public class RideRefundLogServiceImpl implements RideRefundLogService {

    @Autowired
    private RideRefundLogDao rideRefundLogDao;

    @Override
    public RideRefundOrderSta staByTime(Integer accountId, String startTime, String endTime) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put(DaoParamConstant.accountId, accountId);
        params.put(DaoParamConstant.startTime, startTime);
        params.put(DaoParamConstant.endTime, endTime);
        return rideRefundLogDao.staByTime(params);
    }

    @Override
    public Map<String, Object> getByAccountId(Integer accountId, String startDate, String endDate) {
        Map<String, Object> map = new HashMap<>();
        map.put(DaoParamConstant.accountId, accountId);
        map.put("startDate", startDate);
        map.put("endDate", endDate);
        return rideRefundLogDao.getByAccountId(map);
    }
}
